<template>
	<view>
		<view class="main">
			<view class="grouping-item" v-for="item in test">
				<view class="grouping-title">
					<text>分組1</text>
					<image src="../../static/icon/Cut@3x.png" mode=""></image>
				</view>
				<view class="grouping-content">
					<view class="top-box">
						<text>分組名稱</text>
						<text>{{item.name}}</text>
					</view>
					<view class="bottom-box">
						<text>分組人數</text>
						<text>{{item.number}}</text>
					</view>
				</view>
			</view>
			<view class="addGroup">
				<button @click="add">添加分組</button>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				test: [{
						name: "學生",
						number: "30人"
					},
					{
						name: "家長",
						number: "30人"
					},
					{
						name: "教師",
						number: "5人"
					},
				]
			}
		},
		onLoad() {

		},
		methods: {

		}
	}
</script>

<style lang="scss" scoped>
	.main {
		width: 92%;
		margin: 0 auto;
		position: relative;
	}

	image {
		width: 40upx;
		height: 40upx;
		vertical-align: middle;
	}

	.grouping-title {
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		padding: 20upx 0;
		text {
			font-size: 40upx;
		}
	}

	.grouping-content {
		display: flex;
		flex-direction: column;
		background-color: #FFFFFF;
		border-radius: 20upx;
		box-shadow: 0 0 30px #e6e6e6;

		.top-box,
		.bottom-box {
			display: flex;
			flex-direction: row;
			justify-content: space-between;
			padding: 40upx;
		}

		.top-box {
			border-bottom: 1px solid #e5e5e5;
		}

		text {
			font-size: 32upx;
		}
	}

	.addGroup {
		width: 92%;
		position: fixed;
		bottom: 20upx;

		button {
			width: 100%;
			height: 80upx;
			line-height: 80upx;
			background-color: #508df1;
			color: #FFFFFF;
			font-size: 32upx;
		}
	}
</style>
